package main

import "fmt"
import "bytes"

func insertStringSlice(source, dest []byte, index int) []byte {
	oldLen:=len(source)
	newLen:=oldLen + len(dest)
	result:=make([]byte, newLen)

	copy(result,dest[0:index])
	copy(result[index:],source)
	copy(result[index+len(source):], dest[index:])

	return result
}

func main() {
	var dest []byte=[]byte{'h','e','l','l','o',',',' ','w','o','r','l','d'}
	var source []byte=[]byte{' ','t','h','e','r','e'}

	result:=insertStringSlice(source,dest,5)
	buf:=bytes.NewBuffer(result)
	fmt.Println(buf.String())
}
